﻿<r:RibbonWindow x:Class="RibbonMain"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
    Title="ATS 2.0" ResizeMode="CanResizeWithGrip" WindowStartupLocation="CenterScreen"
    Height="700" Width="800" MinHeight="400" MinWidth="400"
                        xmlns:locala="clr-namespace:ATS" FontFamily="Verdana">
    <r:RibbonWindow.Resources>
        <ResourceDictionary>
            <r:RibbonCommand x:Key="QATButton" CanExecute="RibbonCommand_CanExecute" LabelTitle="Log-off button" LabelDescription="Quick log-off button" ToolTipTitle="Log-Off" ToolTipDescription="Log-off from ATS" SmallImageSource="images/main/logoff.png" LargeImageSource="images/main/logoff.png" />
            <r:RibbonCommand x:Key="MenuItemLogoff" CanExecute="RibbonCommand_CanExecute" LabelTitle="Log-off" LabelDescription="Log-off button" ToolTipTitle="Log-Off" ToolTipDescription="Log-Off from ATS" SmallImageSource="images/main/logoff.png" LargeImageSource="images/main/logoff.png" />
            <r:RibbonCommand x:Key="MenuItemExit" CanExecute="RibbonCommand_CanExecute" LabelTitle="Exit" LabelDescription="Exit" ToolTipTitle="Exit" ToolTipDescription="Exit and close ATS" SmallImageSource="images/main/exit.png" LargeImageSource="images/main/exit.png" />
            <r:RibbonCommand x:Key="MenuItemChangePassword" CanExecute="RibbonCommand_CanExecute" LabelTitle="Change Password" LabelDescription="Change Password" ToolTipTitle="Change Password" ToolTipDescription="Change Password" SmallImageSource="images/main/changepassword.png" LargeImageSource="images/main/changepassword.png" />
            <r:RibbonCommand x:Key="MenuItemDatabaseAction" CanExecute="RibbonCommand_CanExecute" LabelTitle="Database" LabelDescription="Database" ToolTipTitle="Database" ToolTipDescription="Database Backup or Restore" SmallImageSource="images/main/Database.png" LargeImageSource="images/main/Database.png" />

            <r:RibbonCommand x:Key="GeneralSettingsButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Account Policies" LabelDescription="Account Policies" ToolTipTitle="Account Policies" ToolTipDescription="Account Policies" SmallImageSource="images/main/settings-3597.png" LargeImageSource="images/main/settings-3597.png" />
            <r:RibbonCommand x:Key="GeneralSettingsButton2" CanExecute="RibbonCommand_CanExecute" LabelTitle="Reader Settings" LabelDescription="Reader Settings" ToolTipTitle="Reader Settings" ToolTipDescription="Reader Settings" SmallImageSource="images/main/settings-2770.png" LargeImageSource="images/main/settings-2770.png" />
           
            
            <r:RibbonCommand x:Key="AccountsButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Users" LabelDescription="Users" ToolTipTitle="Users" ToolTipDescription="Manage ATS users" SmallImageSource="images/main/contact.png" LargeImageSource="images/main/contact.png" />

            <r:RibbonCommand x:Key="DataFormButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Categories" LabelDescription="Categories" ToolTipTitle="Categories" ToolTipDescription="Maintain category list" SmallImageSource="images/main/clipboard-10570.png" LargeImageSource="images/main/clipboard-10570.png" />
            <r:RibbonCommand x:Key="DataFormButton2" CanExecute="RibbonCommand_CanExecute" LabelTitle="Locations" LabelDescription="Locations" ToolTipTitle="Locations" ToolTipDescription="Maintain location list" SmallImageSource="images/main/location.png" LargeImageSource="images/main/location.png" />
            <r:RibbonCommand x:Key="DataFormButton3" CanExecute="RibbonCommand_CanExecute" LabelTitle="Persons" LabelDescription="Persons" ToolTipTitle="Persons" ToolTipDescription="Maintain list of accountable persons" SmallImageSource="images/main/personal.png" LargeImageSource="images/main/personal.png" />
            <r:RibbonCommand x:Key="DataFormButton4" CanExecute="RibbonCommand_CanExecute" LabelTitle="Departments" LabelDescription="Departments" ToolTipTitle="Departments" ToolTipDescription="Maintain department list " SmallImageSource="images/main/department.png" LargeImageSource="images/main/department.png" />

            <r:RibbonCommand x:Key="ItemsButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Items" LabelDescription="Items" ToolTipTitle="Items" ToolTipDescription="Add/Edit/Remove assets" SmallImageSource="images/main/items.png" LargeImageSource="images/main/items.png" />
            
            <r:RibbonCommand x:Key="RibbonButtonReport" CanExecute="RibbonCommand_CanExecute" LabelTitle="Reports" LabelDescription="Reports" ToolTipTitle="Reports" ToolTipDescription="View/Print reports" SmallImageSource="images/main/report.png" LargeImageSource="images/main/report.png" />
            <r:RibbonCommand x:Key="RibbonButtonConfigReport" CanExecute="RibbonCommand_CanExecute" LabelTitle="Config" LabelDescription="Config" ToolTipTitle="Config" ToolTipDescription="Config reports" SmallImageSource="images/main/config_tools.png" LargeImageSource="images/main/config_tools.png" />

            <r:RibbonCommand x:Key="SubledgerButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Department" LabelDescription="Department" ToolTipTitle="Department" ToolTipDescription="Subsidiary Ledger per department" SmallImageSource="images/main/department.png" LargeImageSource="images/main/department.png" />
            <r:RibbonCommand x:Key="SubledgerButton2" CanExecute="RibbonCommand_CanExecute" LabelTitle="Location" LabelDescription="Location" ToolTipTitle="Location" ToolTipDescription="Subsidiary Ledger per location" SmallImageSource="images/main/location.png" LargeImageSource="images/main/location.png" />
            <r:RibbonCommand x:Key="SubledgerButton3" CanExecute="RibbonCommand_CanExecute" LabelTitle="Classification" LabelDescription="Classification" ToolTipTitle="Classification" ToolTipDescription="Subsidiary Ledger per asset classification" SmallImageSource="images/main/assetclassification.png" LargeImageSource="images/main/assetclassification.png" />
            <r:RibbonCommand x:Key="SubledgerButton4" CanExecute="RibbonCommand_CanExecute" LabelTitle="Leased" LabelDescription="Leased" ToolTipTitle="Leased" ToolTipDescription="Subsidiary Ledger of leased asset" SmallImageSource="images/main/leasedasset.png" LargeImageSource="images/main/leasedasset.png" />



            <r:RibbonCommand x:Key="HomeButton1" CanExecute="RibbonCommand_CanExecute" LabelTitle="Calculator" LabelDescription="Calc This!" ToolTipTitle="Calculator" ToolTipDescription="Used to do math and stuff" SmallImageSource="images/actions/ctrlsave.png" LargeImageSource="images/actions/ctrlsave.png" />
            <r:RibbonCommand x:Key="HomeButton2" CanExecute="RibbonCommand_CanExecute" LabelTitle="Calendar" LabelDescription="Schedule This!" ToolTipTitle="Calendar" ToolTipDescription="Schedule and remind yourself of stuff" SmallImageSource="images/actions/ctrlsave.png" LargeImageSource="images/actions/ctrlsave.png" />
            <r:RibbonCommand x:Key="HomeButton3" CanExecute="RibbonCommand_CanExecute" LabelTitle="Computer" LabelDescription="Format This!" ToolTipTitle="Computer" ToolTipDescription="Where you store your naked pictures" SmallImageSource="images/actions/ctrlsave.png" LargeImageSource="images/actions/ctrlsave.png" />

            <r:RibbonCommand x:Key="SynchButton" CanExecute="RibbonCommand_CanExecute" LabelTitle="Reader" LabelDescription="Synch" ToolTipTitle="Synch" ToolTipDescription="Extract data from the Reader" SmallImageSource="images/main/connectestablished-35258.png" LargeImageSource="images/main/connectestablished-35258.png" />
            
            <LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Red" Offset="0.0"/>
                <GradientStop Color="Red" Offset="1.0"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Black" Offset="0.0"/>
                <GradientStop Color="Gray" Offset="1.0"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GlyphBrush" Color="Black" />
            <LinearGradientBrush x:Key="HoverBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Gray" Offset="0.0"/>
                <GradientStop Color="LightGreen" Offset="1.0"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Red" Offset="0.0"/>
                <GradientStop Color="#404040" Offset="0.1"/>
                <GradientStop Color="#707070" Offset="0.9"/>
                <GradientStop Color="#808080" Offset="1.0"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ForegroundBrush" Color="Black" />
            <LinearGradientBrush x:Key="HeaderBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="White" Offset="0"/>
                <GradientStop Color="LightGray" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="OpenHeaderBorderBrush" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Gray" Offset="0.0"/>
                <GradientStop Color="Black" Offset="1.0"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GroupBackgroundBrush" Color="Transparent"/>
            <SolidColorBrush x:Key="OpenGroupBorderBrush" Color="#808080"/>
            <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#404040" />
            <SolidColorBrush x:Key="DisabledBorderBrush" Color="#606060" />
            <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#808080" />

            <!-- Expander toogle button template 
            <ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButton">
                <Border Name="Border"
                        CornerRadius="20"
                        Margin="2,4" 
                        Background="Transparent"
                        BorderBrush="{StaticResource NormalBorderBrush}"
                        BorderThickness="1">
                    <Path Name="Arrow"
                          Fill="{StaticResource GlyphBrush}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Data= "M 0 0 L 4 4 L 8 0 Z"/>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="ToggleButton.IsMouseOver" Value="true">
                        <Setter TargetName="Border" Property="Background"
                                Value="{StaticResource HoverBrush}" />
                    </Trigger>
                    <Trigger Property="IsPressed" Value="true">
                        <Setter TargetName="Border" Property="Background"
                                Value="{StaticResource PressedBrush}" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="true">
                        <Setter TargetName="Arrow" Property="Data"
                                Value="M 0 4 L 4 0 L 8 4 Z" />
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="False">
                        <Setter TargetName="Border" Property="Background"
                                Value="{StaticResource DisabledBackgroundBrush}" />
                        <Setter TargetName="Border" Property="BorderBrush"
                                Value="{StaticResource DisabledBorderBrush}" />
                        <Setter Property="Foreground"
                                Value="{StaticResource DisabledForegroundBrush}"/>
                        <Setter TargetName="Arrow" Property="Fill"
                                Value="{StaticResource DisabledForegroundBrush}" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
-->
            <!-- Expander style 
            <Style TargetType="Expander">
                <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Expander">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Name="ContentRow" Height="0"/>
                                </Grid.RowDefinitions>
                                <Border Name="Border" 
                                        Grid.Row="0" 
                                        Background="{StaticResource HeaderBrush}"                                        
                                        BorderBrush="{StaticResource NormalBorderBrush}"
                                        BorderThickness="1" 
                                        CornerRadius="4,4,0,0" >
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="20" />
                                        </Grid.ColumnDefinitions>
                                        <ToggleButton Grid.Column="1"
                                            IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,
                                            RelativeSource={RelativeSource TemplatedParent}}"
                                                      OverridesDefaultStyle="True" 
                                                      Template="{StaticResource ExpanderToggleButton}" 
                                                      Background="{StaticResource NormalBrush}" />
                                        <ContentPresenter Grid.Column="0"
                                                          Margin="4" 
                                                          ContentSource="Header" 
                                                          RecognizesAccessKey="True" />
                                    </Grid>
                                </Border>
                                <Border Name="Content" 
                                        Grid.Row="1" 
                                        Background="{StaticResource GroupBackgroundBrush}"
                                        BorderBrush="{StaticResource OpenGroupBorderBrush}" 
                                        BorderThickness="1,0,1,1" 
                                        CornerRadius="0,0,4,4" >
                                    <ContentPresenter Margin="4" />
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsExpanded" Value="True">
                                    <Setter TargetName="ContentRow" 
                                            Property="Height"
                                            Value="{Binding ElementName=Content,Path=DesiredHeight}" />
                                    <Setter TargetName="Border" Property="BorderBrush"
                                            Value="{StaticResource OpenHeaderBorderBrush}"/>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter TargetName="Border" Property="Background"
                                            Value="{StaticResource DisabledBackgroundBrush}" />
                                    <Setter TargetName="Border" Property="BorderBrush"
                                            Value="{StaticResource DisabledBorderBrush}" />
                                    <Setter Property="Foreground"
                                            Value="{StaticResource DisabledForegroundBrush}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            -->

            <Style TargetType="{x:Type TabItem}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabItem}">
                            <Grid>
                                <Border 
                                    Name="Border"
                                    Background="LightBlue"
                                    BorderBrush="Black" 
                                    BorderThickness="1,1,1,1" 
                                    CornerRadius="0,6,0,0">
                                    <ContentPresenter x:Name="ContentSite"
                                                      VerticalAlignment="Center"
                                                      HorizontalAlignment="Center"                                                  
                                                      ContentSource="Header"
                                                      Margin="12,2,12,2"/>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter TargetName="Border" 
                                            Property="Background" Value="LightGray" />
                                </Trigger>
                                <Trigger Property="IsSelected" Value="False">
                                    <Setter TargetName="Border" Property="Background" Value="Transparent" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>



            <locala:TreeViewLineConverter x:Key="LineConverter"/>



            <!--=================================================================
      TreeViewItem
  ==================================================================-->
            <Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
                <Setter Property="Focusable" Value="False"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToggleButton">
                            <Grid
              Width="15"
              Height="13"
              Background="White">
                                <Path x:Name="ExpandPath"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Margin="1,1,1,1"
                Fill="{StaticResource GlyphBrush}"
                Data="M 4 0 L 8 4 L 4 8 Z"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked"
                   Value="True">
                                    <Setter Property="Data"
                    TargetName="ExpandPath"
                    Value="M 0 4 L 8 4 L 4 8 Z"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="TreeViewItemFocusVisual">
                <Setter Property="Control.Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border>
                                <Rectangle Margin="0,0,0,0"
                     StrokeThickness="5"
                     Stroke="Black"
                     StrokeDashArray="1 2"
                     Opacity="0"/>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="{x:Type TreeViewItem}"
         TargetType="{x:Type TreeViewItem}">
                <Setter Property="Background"
          Value="Transparent"/>
                <Setter Property="HorizontalContentAlignment"
          Value="{Binding Path=HorizontalContentAlignment,
              RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="VerticalContentAlignment"
          Value="{Binding Path=VerticalContentAlignment,
              RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="Padding"
          Value="1,0,0,0"/>
                <Setter Property="Foreground"
          Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                <Setter Property="FocusVisualStyle"
          Value="{StaticResource TreeViewItemFocusVisual}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TreeViewItem}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MinWidth="19"
                          Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>

                                <!-- Connecting Lines -->
                                <Rectangle x:Name="HorLn" Height="1" Stroke="#8888"  Margin="10,0,0,0" SnapsToDevicePixels="true"/>
                                <Rectangle x:Name="VerLn" Width="1" Stroke="#8888" Grid.RowSpan="2" SnapsToDevicePixels="true"/>
                                <ToggleButton x:Name="Expander"
                      Style="{StaticResource ExpandCollapseToggleStyle}"
                      IsChecked="{Binding Path=IsExpanded,
                              RelativeSource={RelativeSource TemplatedParent}}"
                      ClickMode="Press"/>
                                <Border Name="Bd"
                  Grid.Column="1"
                  Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  Padding="{TemplateBinding Padding}">
                                    <ContentPresenter x:Name="PART_Header"
                          ContentSource="Header"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                                </Border>
                                <ItemsPresenter x:Name="ItemsHost"
                      Grid.Row="1"
                      Grid.Column="1"
                      Grid.ColumnSpan="2"/>
                            </Grid>
                            <ControlTemplate.Triggers>

                                <!-- This trigger changes the connecting lines if the item is the last in the list -->
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Converter={StaticResource LineConverter}}" Value="true">
                                    <Setter TargetName="VerLn"
                    Property="Height"
                    Value="6"/>
                                    <Setter TargetName="VerLn"
                    Property="VerticalAlignment"
                    Value="Top"/>
                                </DataTrigger>
                                <Trigger Property="IsExpanded"
                   Value="false">
                                    <Setter TargetName="ItemsHost"
                    Property="Visibility"
                    Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="HasItems"
                   Value="false">
                                    <Setter TargetName="Expander"
                    Property="Visibility"
                    Value="Hidden"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="HasHeader"
                         Value="false"/>
                                        <Condition Property="Width"
                         Value="Auto"/>
                                    </MultiTrigger.Conditions>
                                    <Setter TargetName="PART_Header"
                    Property="MinWidth"
                    Value="75"/>
                                </MultiTrigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="HasHeader"
                         Value="false"/>
                                        <Condition Property="Height"
                         Value="Auto"/>
                                    </MultiTrigger.Conditions>
                                    <Setter TargetName="PART_Header"
                    Property="MinHeight"
                    Value="19"/>
                                </MultiTrigger>
                                <Trigger Property="IsSelected"
                   Value="true">
                                    <Setter TargetName="Bd"
                    Property="Background"
                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                                    <Setter Property="Foreground"
                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsSelected"
                         Value="true"/>
                                        <Condition Property="IsSelectionActive"
                         Value="false"/>
                                    </MultiTrigger.Conditions>
                                    <Setter TargetName="Bd"
                    Property="Background"
                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                                    <Setter Property="Foreground"
                    Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                                </MultiTrigger>
                                <Trigger Property="IsEnabled"
                   Value="false">
                                    <Setter Property="Foreground"
                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <!-- Uncomment below for Office 2007 Blue -->
            <!--<ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml" />
            </ResourceDictionary.MergedDictionaries>-->
            <!-- Uncomment below for Office 2007 Silver -->
            <!--ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Silver.xaml" />
            </ResourceDictionary.MergedDictionaries-->
            <!-- Uncomment below for Office 2007 Black -->
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Black.xaml" />
            </ResourceDictionary.MergedDictionaries>

        </ResourceDictionary>


       

    </r:RibbonWindow.Resources>

   <DockPanel>
        <r:Ribbon DockPanel.Dock="Top" Title="ATS 2.0" x:Name="mainRibbon">
            <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar>
                    <r:RibbonButton Command="{StaticResource QATButton}" Name="RibbonButton2" />
                    <r:RibbonButton Command="{StaticResource SynchButton}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu" Name="RibbonButton1" />
                </r:RibbonQuickAccessToolBar>
            </r:Ribbon.QuickAccessToolBar>
            <r:Ribbon.ApplicationMenu>
                <r:RibbonApplicationMenu>
                    <r:RibbonApplicationMenu.Command>
                        <r:RibbonCommand SmallImageSource="images/main/keys.png" LargeImageSource="images/main/keys.png" />
                    </r:RibbonApplicationMenu.Command>
                    <r:RibbonApplicationMenuItem Command="{StaticResource MenuItemLogoff}" Name="RibbonApplicationMenuItemLogOff"></r:RibbonApplicationMenuItem>                    
                    <r:RibbonSeparator></r:RibbonSeparator>
                    <r:RibbonApplicationMenuItem Command="{StaticResource MenuItemChangePassword}" Name="RibbonApplicationMenuItemChangePassword"/>                    
                    <r:RibbonSeparator></r:RibbonSeparator>
                    <r:RibbonApplicationMenuItem Command="{StaticResource MenuItemDatabaseAction}">                        
                        <TextBlock Name="tbBackupDatabase">
                            <TextBlock.Inlines>
                                <Run FontSize="12" Text="Backup"  />
                            </TextBlock.Inlines>
                        </TextBlock>
                        <TextBlock  Name="tbRestoreDatabase">
                            <TextBlock.Inlines>
                                <Run FontSize="12" Text="Restore"  />
                            </TextBlock.Inlines>
                        </TextBlock>
                    </r:RibbonApplicationMenuItem>    
                    <r:RibbonSeparator></r:RibbonSeparator>
                    <r:RibbonApplicationMenuItem Command="{StaticResource MenuItemExit}" Name="RibbonApplicationMenuItemLogExit"></r:RibbonApplicationMenuItem>                    
                    <r:RibbonApplicationMenu.RecentItemList>
                        <Rectangle Height="300" />
                    </r:RibbonApplicationMenu.RecentItemList>
                </r:RibbonApplicationMenu>
            </r:Ribbon.ApplicationMenu>

            

            <r:RibbonTab Label="Administration" Name="ribbonTabAdmin">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="General Settings" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />                                
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>
                    
                    <r:RibbonToggleButton Command="{StaticResource GeneralSettingsButton1}" Name="RibbonTButtonAccountPolicies" />
                    <r:RibbonButton Command="{StaticResource GeneralSettingsButton2}" Name="RibbonButtonReaderSettings" />
                    
                </r:RibbonGroup>
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Accounts" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />                                
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>

                    <r:RibbonButton Command="{StaticResource AccountsButton1}" Name="RibbonButtonUsers" />
                    
                </r:RibbonGroup>
            </r:RibbonTab>
            
            <r:RibbonTab Label="Synchronise" Name="ribbonTabSynch">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Synch" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>
                    <r:RibbonButton Command="{StaticResource SynchButton}" Name="RibbonButtonSynch" />


                </r:RibbonGroup>
            </r:RibbonTab>
            
            <r:RibbonTab Label="Data Forms" Name="ribbonTabDataForms">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Maintenance List" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>
                    <r:RibbonButton Command="{StaticResource DataFormButton1}" Name="RibbonButtonCategories" />
                    <r:RibbonButton Command="{StaticResource DataFormButton2}" Name="RibbonButtonLocations" />
                    <r:RibbonButton Command="{StaticResource DataFormButton3}" Name="RibbonButtonPersons" />
                    <r:RibbonButton Command="{StaticResource DataFormButton4}" Name="RibbonButtonDepartments" />


                </r:RibbonGroup>
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Asset" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>

                    <r:RibbonButton Command="{StaticResource ItemsButton1}" Name="RibbonButtonItems" />

                </r:RibbonGroup>
            </r:RibbonTab>
            <r:RibbonTab Label="Reports" Name="ribbonTabReports">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Reports" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>

                    <r:RibbonButton Command="{StaticResource RibbonButtonReport}" Name="RibbonButtonReport" />
                    <r:RibbonButton Command="{StaticResource RibbonButtonConfigReport}" Name="RibbonButtonConfigReport" />
                </r:RibbonGroup>

            </r:RibbonTab>
           
            
            <r:RibbonTab Label="Subsidiary Ledger" Name="ribbonTabSubLedger">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Ledger" />
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
                            </r:RibbonGroupSizeDefinition>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>

                    <r:RibbonButton Command="{StaticResource SubledgerButton1}" Name="RibbonButtonDepartmentLedger" />
                    <r:RibbonButton Command="{StaticResource SubledgerButton2}" Name="RibbonButtonLocationLedger" />
                    <r:RibbonButton Command="{StaticResource SubledgerButton3}" Name="RibbonButtonCategoryLedger" />
                    <r:RibbonButton Command="{StaticResource SubledgerButton4}" Name="RibbonButtonLeasedAssetLedger" />
                </r:RibbonGroup>

            </r:RibbonTab>
        </r:Ribbon>
        
            <Grid Name="MainGrid" Background="WhiteSmoke">
                <Grid.RowDefinitions>
                    <RowDefinition Height="500*"></RowDefinition>
                    <RowDefinition Height="auto"></RowDefinition>
                </Grid.RowDefinitions>
                <Border Name="mask" Background="White" CornerRadius="7"/>
                <Grid Grid.Row="0" Name="GridViewContent">
                </Grid>
                <ToolBar Grid.Row="1">
                    <Label Name="labelUser" >test</Label>
                </ToolBar>
            </Grid>
        
    </DockPanel>
            
</r:RibbonWindow>



  